package com.ctg.itrdc.sysmgr.portal.data.impl;

import org.springframework.stereotype.Component;

import com.ctg.itrdc.pasp.core.PageInfo;
import com.ctg.itrdc.pasp.data.dao.BaseDao;
import com.ctg.itrdc.sysmgr.portal.data.IStaffDao;
import com.ctg.itrdc.sysmgr.portal.data.entity.Staff;

@Component("staffDao")
public class StaffDaoImpl extends BaseDao<Staff, Long> implements IStaffDao {

	private PageInfo<Staff> pageByExample(Staff entity, int currentPage,
			int perPageNum) {
		return jdbcFindPageInfo(entity, currentPage, perPageNum);
	}

	//TODO  实际使用时，传入的ids为staff的id，故直接去掉了ids
	@Override
	public PageInfo<Staff> selectByExampleAndOrgIds(Staff staff,
			int currentPage, int perPageNum, Long... orgIds) {
		return pageByExample(staff, currentPage, perPageNum);
	}
}